/**
 * 课程管理
 */

import request from "@/utils/request.js"

// 获取课程列表 / 搜索
export function getCourseListApi(params) {
  return request({
    url: '/edu/course/list',
    method: 'POST',
    params
  })
}

// 获取所属专业列表
export function getMajorListApi() {
  return request({
    url: '/edu/major/majorlistOfDrop-down',
    method: 'POST',
  })
}

// 获取课程类型列表
export function getCourseTypeListApi(params) {
  return request({
    url: '/edu/typeData/list',
    method: 'POST',
    params
  })
}

// 添加
export function addCourseListApi(params) {
  return request({
    url: "/edu/course/add",
    method: 'POST',
    params
  })
}

// 删除
export function delCourseListApi(params) {
  return request({
    url: "/edu/course/remove",
    method: 'POST',
    params
  })
}

// 修改
export function updateCourseListApi(params) {
  return request({
    url: "/edu/course/edit",
    method: 'POST',
    params
  })
}

// 导出
export function exportApi() {
  return request({
    url: "/edu/course/export",
    responseType: 'blob',
    method: 'POST',
  })
}

// 导入
export function importApi(params) {
  return request({
    url: "/edu/course/importData",
    ContentType: 'multipart/form-data',
    method: 'POST',
    params
  })
}
